<?
    if(isset($_SESSION["logged"]) && $_SESSION["logged"] === true){
        header("location:/dashboard");
    }
?>
<?$this->extend("layout/main") ?>
<?=$this->js("javascript/login.js")?>

<div id="head" class="corner">
    <span> VGestion </span> | Interface de gestion en ligne
</div>

<div class="corner" id="login_box" style="width:300px;padding:10px;background:#FFF;margin-left:auto;margin-right:auto;margin-top:25px;">
<center>
<form action="javascript:login();">
    <table>
        <tr><th> Login : </th></tr>
        <tr><td> <input type="text" id="login"/> </td></tr>
        <tr><th> Mot de passe : </th></tr>
        <tr><td> <input type="password" id="password"/> </td></tr>
        <tr><td colspan="2" align="center"><input type="submit" value="Valider"/></td></tr>
        <tr><td colspan="2" align="center"><div style="text-align:center;color:red;font-weight:bold;margin-top:5px;" id="login_error"></div></td></tr>
    </table>
</center>
</form>
</div>